﻿@using Best.SmartCms.Core.Utility
@model Best.SmartCms.Portal.Models.NewsInfoModel

<div class="banner3"></div>
<div class="container">
  <div class="wrap">
    <div class="clear">
      <div class="cl30"></div>
      <div class="second_side fl">
        @await Component.InvokeAsync("LeftMenu", Model.ChannelId)
      </div>
      <div class="second_main fr">
        <div class="se_title">
          <h2>@Model.ChannelName</h2>
        </div>
        <div class="cont">
          <ul class="pic_list clear">
            @{ var i = 0;}
            @foreach (var item in Model.PageData.Data)
            {
              i++;
              var islast = i % 3 == 0;
              <li @($"class={(islast ? "last" : "")}")>
                <div class="imgbox">
                  <a target="_blank" href="/news/Preview/@item.Id"><img src="@item.ImageUrl" width="232" height="131"/></a>
                </div>
                <p>
                  <a href="/news/Preview/@item.Id" title="@item.Title">@item.Title.SubStringWithEllipsis(15)</a>
                </p>
              </li>
            }
          </ul>

          @await Component.InvokeAsync("Pagination", Model.PageData)
        </div>
      </div>
    </div>
  </div>
</div>
